<?php 

$this->breadcrumbs = array(
        'Ask'=>array('index'),
        'Manage',
);

$this->menu = array();

if (Yii::app()->user->checkAccess('admin'))
{
        $this->menu = array(
            array('label'=>'Return Ask', 'url'=>array('view', 'id'=>$_GET['id'])),
            array('label' => 'Manage Ask', 'url' => array('admin')),
        );
}
?>

<h1>Manage Reply</h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
        'id'=>'reply-grid',
        'dataProvider'=>$dataProvider,
        'columns'=>array(
                'reply_id',
                array(
                        'name'=>  Yii::t('ask/views', 'Ask Title'),
                        'value'=>'$data->ask->title',
                ),
                array(
                        'name'=>'body',
                        'value'=>'mb_substr(strip_tags($data->body), 0, 10, "utf-8");',
                ),
                array(
                        'name'=>Yii::t('ask/views', 'User Name'),
                        'value'=>'$data->user->user_name',
                ),
                'createdOn',
                array(
                        'name'=>'isFloor',
                        'value'=>'$data->isFloor ? "Yes" : "No"',
                ),
                array(
                        'name'=>'status',
                        'value'=>'$data->status'
                ),
                array(
                        'header'=>  Yii::t('ask/views', 'Actions'),
                       'class'=>'CButtonColumn', 
                        'template'=>"{view}{delete}",
                        'viewButtonUrl'=>'Yii::app()->createUrl("askReply/view/$data->reply_id")',
//                        'updateButtonUrl'=>'Yii::app()->createUrl("askReply/update/$data->reply_id")',
                        'deleteButtonUrl'=>'Yii::app()->createUrl("askReply/delete/$data->reply_id")',
                ),
        ),
));?>